package com.fire.market.repository.impl;

import com.fire.component.extension.Assert;
import com.fire.market.entity.PromoDo;
import com.fire.market.mapper.PromoDoMapper;
import com.fire.market.repository.PromoRepository;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class PromoRepositoryImpl implements PromoRepository {
    @Resource
    private PromoDoMapper promoDoMapper;
    @Override
    public PromoDo selectPromoByItemId(Integer itemId) {
        Assert.notNull(itemId,"itemId is null");
        return promoDoMapper.selectByItemId(itemId);
    }
}
